@extends('backend::layouts.default')

@section('sidebar-menu')

    <li class="{{ Active::pattern(['admin/shop/list*', 'admin/shop/import']) }}">
        <a href="#">
            <i class="iconfont icon-mendianguanli"></i>
            <span class="nav-label">门店</span>
            <span class="fa arrow"></span>
        </a>
        <ul class="nav nav-second-level collapse">
            <li class="{{ Active::pattern(['admin/shop/list/store', 'admin/shop/list/store/curd*']) }}">
                <a href="{{route('admin.shop.list.store')}}">门店列表</a>
            </li>
            <li class="{{ Active::pattern(['admin/shop/list/tag', 'admin/shop/list/tag/curd*']) }}">
                <a href="{{route('admin.shop.list.tag')}}">标签管理</a>
            </li>
            <li class="{{ Active::pattern(['admin/shop/list/activity', 'admin/shop/list/activity/curd*', 'admin/shop/list/activity/select*']) }}">
                <a href="{{route('admin.shop.list.activity')}}">活动管理</a>
            </li>
            <li class="{{ Active::pattern(['admin/shop/list/city', 'admin/shop/list/city/curd*']) }}">
                <a href="{{route('admin.shop.list.city')}}">城市管理</a>
            </li>
            <li class="{{ Active::pattern('admin/shop/import') }}">
                <a href="{{route('admin.shop.store.import')}}">导入门店</a>
            </li>

            <li class="{{ Active::pattern('admin/shop/list/clerk/all') }}">
                <a href="{{route('admin.shop.store.clerk.all',['status'=>1])}}">导购列表</a>
            </li>
        </ul>
    </li>
    <li class="{{ Active::pattern('admin/shop/store*') }}">
        <a href="#">
            <i class="iconfont icon-xitongshezhi"></i>
            <span class="nav-label">基本设置</span>
            <span class="fa arrow"></span>
        </a>
        <ul class="nav nav-second-level collapse">
            <li class="{{ Active::pattern('admin/shop/store/system') }}">
                <a href="{{route('admin.shop.store.system')}}">基础信息</a>
            </li>
        </ul>

        <ul class="nav nav-second-level collapse">
            <li class="{{ Active::pattern('admin/shop/store/clerk/settings') }}">
                <a href="{{route('admin.shop.clerk.settings')}}">O2O设置</a>
            </li>
        </ul>
    </li>
    <li class="{{ Active::pattern(['admin/shop/discount*', 'admin/shop/coupon*']) }}">
        <a href="#">
            <i class="iconfont icon-cuxiaoguanli"></i>
            <span class="nav-label">促销管理</span>
            <span class="fa arrow"></span>
        </a>
        <ul class="nav nav-second-level collapse">
            <li class="{{ Active::pattern('admin/shop/discount*') }}">
                <a href="{!!route('admin.shop.promotion.discount.index')!!}">促销活动管理</a>
            </li>
            <li class="{{ Active::pattern('admin/shop/coupon*') }}">
                <a href="{!!route('admin.shop.promotion.coupon.index')!!}">优惠券管理</a>
            </li>
        </ul>
    </li>



    @if(session()->has('shop_id'))
        <li class="{{ Active::pattern('admin/shop/clerk/manage*') }}">
            <a href="#">
                <i class="iconfont icon-yuangongguanli"></i>
                <span class="nav-label">导购管理</span>
                <span class="fa arrow"></span>
            </a>
            <ul class="nav nav-second-level collapse">
                <li class="{{ Active::pattern('admin/shop/clerk/manage*') }}">
                    <a href="{{route('admin.shop.clerk.list',['status'=>1,'shop_id'=>session('shop_id')])}}">导购列表</a>
                </li>
            </ul>
        </li>
    @endif

    @if(session()->has('shop_id'))
        <li class="{{ Active::pattern(['admin/shop/order*', 'admin/shop/refund*']) }}">
            <a href="#">
                <i class="iconfont icon-dingdanguanli"></i>
                <span class="nav-label">门店订单</span>
                <span class="fa arrow"></span>
            </a>
            <ul class="nav nav-second-level collapse">
                <li class="{{ Active::pattern('admin/shop/order*') }}">
                    <a href="{!!route('admin.shop.order.index', ['shop_id' => session('shop_id'),'status'=>''])!!}">订单列表</a>
                </li>
                <li class="{{ Active::pattern('admin/shop/refund*') }}">
                    <a href="{!!route('admin.shop.refund.index', ['shop_id' => session('shop_id'),'status'=>''])!!}">售后列表</a>
                </li>
            </ul>
        </li>

        <li class="{{ Active::pattern('admin/shop/users*') }}">
            <a href="#">
                <i class="iconfont icon-jiaoseguanli"></i>
                <span class="nav-label">用户管理</span>
                <span class="fa arrow"></span>
            </a>
            <ul class="nav nav-second-level collapse">
                <li class="{{ Active::pattern('admin/shop/users*') }}">
                    <a href="{!!route('admin.shop.user.index', ['shop_id' => session('shop_id')])!!}">用户列表</a>
                </li>
            </ul>
        </li>
    @endif

    @if(session()->has('shop_id'))
        <li class="{{ Active::pattern(['admin/shop/goods*', 'admin/shop/import*']) }}">
            <a href="#">
                <i class="iconfont icon-shangpinshezhi-"></i>
                <span class="nav-label">商品管理</span>
                <span class="fa arrow"></span>
            </a>
            <ul class="nav nav-second-level collapse">
                <li class="{{ Active::pattern('admin/shop/goods*') }}">
                    <a href="{!!route('admin.shop.goods.index', ['shop_id' => session('shop_id'), 'sold_out'=>'ACTIVITY'])!!}">商品列表</a>
                </li>
                <li class="{{ Active::pattern('admin/shop/import*') }}">
                    <a href="{!!route('admin.shop.goods.importInventory', ['shop_id' => session('shop_id')])!!}">批量导入库存</a>
                </li>
            </ul>
        </li>
    @endif

@endsection
